///* 
// * File:   main.cpp
// * Author: guilhermemg
// *
// * Created on 3 de Novembro de 2011, 10:28
// */
//
//#include <cstdlib>
//#include <iomanip>
//#include <cv.h>
//#include <highgui.h>
//#include "familysAlgorithms/average/AveragePixelHue.h"
//#include "familysAlgorithms/average/AveragePixelSaturation.h"
//#include "loader images/Loader.h"
//#include "algorithm/Algorithm.h"
//#include "file/File.h"
//
//using namespace std;
//
//int main(int argc, char** argv) {
//    string p = "/home/guilhermemg/Desktop/Images/";
//    Loader l(p.c_str());
//    vector<IplImage*> images = l.load();
//    
//    //vector<Algorithm> algorithms;
//    
//    //Algorithm *a = new AveragePixelHue(images.at(0));
//    
//    Algorithm *pAlg[2];
//    
//    AveragePixelHue a(images.at(0));
//    pAlg[0] = &a;
//    
//    AveragePixelSaturation b(images.at(0));
//    pAlg[1] = &b;
//    
//    cout << "name: " << pAlg[0]->getName() << endl;
//    pAlg[0]->calculates();
//    cout << "toString: " << pAlg[0]->toString() << endl;
//    cout << "name: " << pAlg[1]->getName() << endl;
//    pAlg[1]->calculates();
//    cout << "toString: " << pAlg[1]->toString() << endl;
//    
//    //algorithms.push_back(*a);
//    //algorithms.push_back(new AveragePixelSaturation());
//    
//    for(int i = 0; i < images.size(); i++) {
//        IplImage* img = images.at(i);
////        for(int j = 0 ; j < algorithms.size(); j++ ) {
////            Algorithm *a1 = &algorithms.at(j);
////            cout << "name: " << dynamic_cast<AveragePixelHue*>(a1)->getName() << endl;
////            cout << a1->toString() << endl;
////            a1->setImage(img);
////            a1->calculates();
////            cout << "average " << a1->getName() << " : " << a1->getValue() << endl;
////        }
//    }
//    
////    cout << "ok" << endl;
////    File f("/home/guilhermemg/Desktop/file1.tsv");
////    vector<string> lines = f.readLines();
////    cout << "ok" << endl;
////    cout << lines.size() << endl;
////    for(int i = 0; i < lines.size(); i++) {
////        cout << "line: " << lines.at(i) << endl;
////    }
//    
//    return 0;
//}
//
////        AveragePixelHue averageHue;
////        AveragePixelSaturation averageSaturation;
////        
////        Algorithm *aveHue = &averageHue;
////        Algorithm *aveSaturation = &averageSaturation;
////        
////        aveHue->setImage(img);
////        aveSaturation->setImage(img);
////        
////        aveHue->calculates();
////        aveSaturation->calculates();
//
//
//
////        cvNamedWindow("Imagem carregada", CV_WINDOW_AUTOSIZE);
////        cvShowImage("Imagem carregada", img);
////        cvWaitKey(0);
////        cvReleaseImage( &img );
////        cvDestroyWindow( "Imagem carregada" );